package com.zbzbzzz.pojo;

import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.stereotype.Component;

/**
 * @Author ：zbzbzzz
 * @Date ：Created in 10:28 2021/2/25
 * @Description：_____
 * @Modified By：
 * @Version: X.X
 */
@Component
public class Person implements SmartInitializingSingleton {

	private String name;

	private int age;

	@Override
	public String toString() {
		return "Person{" +
				"name='" + name + '\'' +
				", age=" + age +
				'}';
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	@Override
	public void afterSingletonsInstantiated() {
		System.out.println("SmartInitializingSingleton实现");
	}
}